package tech.aistar.controller.pay;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import tech.aistar.entity.ServiceOrder;
import tech.aistar.service.order.IServiceOrderService;


@Controller
@RequestMapping("/pay")
public class PaysController {
    @RequestMapping("/list")
        public String pay(){
        return "pay/index";
    }

    @Autowired
    private IServiceOrderService iServiceOrderService;
    @RequestMapping("/pays")
    public String pays(Model model, Integer id){
        System.out.println("idweiiiiii"+id);
        ServiceOrder byIdOne = iServiceOrderService.findByIdOne(id);

        model.addAttribute("byIdOne",byIdOne);
            return "pay/payPage";
    }
}
